﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace EazyCMS.BLL
{
    public class common_data_tools_bll
    {
        common_data_tools_dal dal = new common_data_tools_dal();
        public string getxuenianbll()
        {
            return dal.getxueniandal();
        }
        //学年的修改方法
        public int insertxuenianbll(string xq, string kssj, string xn)
        {
            return dal.insertxueniandal(xq, kssj, xn);
        }
        // 根据组别得到会员id
        public DataTable get_count_article(string author, DateTime kssj, DateTime jssj)
        {
            return dal.get_count_article(author, kssj, jssj);
        }
        //根据用户组得到用户数
        public DataTable get_user_bygroups(string group_id)
        {
            return dal.get_user_bygroups(group_id);

        }
        //稿件统计开始日期
        public int update_total_count(string kssj)
        {
            return dal.update_total_count(kssj);
        }
        //得到稿件统计的开始时间
        public DateTime get_total_time()
        {
            return dal.get_total_time();
        }
        //删除用户发表的文章
        public int del_article(int id)
        {
            return dal.del_article(id);
        }
        /// <summary>
        /// 图片新增is_special 1为首页焦点图   2为专题焦点图
        /// </summary>
        /// <param name="url"></param>
        /// <param name="is_special"></param>
        /// <returns></returns>
        public int add_phone(string url, int is_special)
        {
            return dal.add_phone(url, is_special);
        }
        /// <summary>
        /// 图片新增is_special 1为首页焦点图   2为专题焦点图
        /// </summary>
        /// <param name="url"></param>
        /// <param name="is_special"></param>
        /// <returns></returns>
        public DataTable get_phone()
        {
            return dal.get_phone();
        }
        public bool Delete(int id, string url_img)
        {
            return dal.Delete(id, url_img);
        }
        public DataTable get_focus_img(string special_id, int top)
        {
            return dal.get_focus_img(special_id, top);

        }
        public DataTable getyonghu(int id)
        {

            return dal.getyonghu(id);
        }
        public DataTable getxuequ()
        {

            return dal.getxuequ();
        }
        public string select_img_list(string id)
        {
            return dal.select_img_list(id);
        }
        //public string select_tongji_time()
        //{
        //    string sql = "select starttime from dt_count_contribute where id=1";
        //    return 

        //}
        ///广告位显示隐藏
        public void updatabarvalue(string ss)
        {
            dal.updatabarvalue(ss);
        }
        //广告位值的查询
        public string selectbarvalue()
        {
            return dal.selectbarvalue();
        }
        /// 更新总访问数和 当天的访问数
        public void updatenum()
        {
            dal.updatenum();
        }
        ///读取访问总数  今天总数
        public string get_tongji()
        {
            return dal.get_tongji();
        }
        //总文章数和总点击率
        public string GetTotalArticle()
        {
          return  dal.GetTotalArticle();
        }
        //今日点击率 和今日文章发表数量
        public string GetTodayContribute(string k, string j)
        {
            return dal.GetTodayContribute( k,  j);
        }
        ///根据文章id得到文章内容
        public string getarticleinfo(string id)
        {
            return dal.getarticleinfo(id);
        }
        //得到频道信息
        public DataTable GetPinDao()
        {
            return dal.GetPinDao();
        }
    }
}
